package com.springstack.kafka.producer.config;

import lombok.Data;
import org.apache.kafka.common.serialization.StringSerializer;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author qiangfanghao
 * @date 2022/7/21
 * kafka 生产者属性配置
 */

@Data
@Component
@ConfigurationProperties(prefix = "spring.kafka.producer")
public class KafkaProducerProperties {

    private String bootstrapServers;
    /** k v  kafka的序列化器 比java的要轻 */
    private Class<StringSerializer> keySerializer = StringSerializer.class;
    private Class<StringSerializer> valueSerializer = StringSerializer.class;
    private String acks;
    private String batchSize;
    private String bufferMemory;
    private String compressionType;
    private String lingerMs;
}
